<?php

$LIGHTFEED_ENV = $_SERVER['LIGHTFEED_ENV'];

require dirname(__FILE__) . '/bootstrap.php';

// creates instance of the front controller
$controller = Zend_Controller_Front::getInstance();

// adds controllers directories of each modules in the list of controllers directories
$controller->addControllerDirectory($root."/application/default/controllers",'default');

// error tracking
$controller->throwExceptions(false);

// adds all common plugins (filters)
// $controller->registerPlugin(new Myplugin());

// adds configuration routes to controller router

if(@$config->router->class)
{
    $controller->setRouter(new $config->router->class);
}

$controller->getRouter()->addConfig($config, 'routes');

// dispatch the request to the matching action
$controller->dispatch();
